Save the configuration and restart the Syslog daemon using the below command
Copy to Clipboard
service <syslog/rsyslog/syslog-ng> restart
or
Copy to Clipboard
systemctl restart <syslog/rsyslog/syslog-ng>
Note:
The above configuration will only enable forwarding the machine logs to the EventLog Analyzer server.
To configure auto log forwarding from EventLogAnalyzer server using sudo or non sudo user, refer here.
Prerequisites:
Enable HTTPS and configure a valid certificate in server.xml. Click here to know how to configure a valid SSL certificate.
Only pfx format is supported for storing certificate, if you use keystore format, please convert it to pfx.
Using self-signed certificates:
After applying a self-signed certificate, a file named ca.crt will be created in the location <EventLogAnalyzer_Home>/Certificates.
Use this file as the root certificate while configuring log forwarding in clients.
Using other certificates:
For configuring log forwarding, get the root certificate from the certificate vendor.
Note:
If you want to use a different port other than the default ports as specified above, please specify it in the port management settings.
The CommonName should be the same value as given in the certificate file.
Forwarding application/audit logs to the EventLog Analyzer Server
If any particular applications' logs or audit logs needs to be forwarded, then the following configurations needs to be done in Linux devices under rsyslog.conf (or) syslog.conf
Under the MODULES section, check whether the "$ModLoad imfile" is included. (This module "imfile" converts any input text file into a syslog message,which can then be forwarded to the EventLog Analyzer Server.)
The following directives contain the details of the external log file:
$InputFileName <Monitored_File_Absolute_Path>
$InputFileStateFile <State_Filename>
$InputFileSeverity <Severity >
$InputFileFacility <Facility >
$InputRunFileMonitor
To forward the logs we must provide this line: <Facility>.<Severity> @Host-Ip:Port
Example:
$InputFileName /var/log/sample.log
$InputFileStateFile sample
$InputFileSeverity info
$InputFileFacility local6
local6.info @eventloganalyzer-Server:514
Here /var/log/sample.log is the external file to be forwarded.
Note:
These instructions can be applied to all Linux devices.
Please use a unique <State_Filename> for different <Monitored_File_Absolute_Path>.
When forwarding audit logs, sometimes default policies in Red Hat systems with Security enhancement (SElinux) won't allow the audit logs to be read. Refer troubleshooting tips.
Syntax for Installing Packages:
For CentOS/RHEL:
Copy to Clipboard
yum install <package_name>
For Ubuntu:
Copy to Clipboard
apt-get install <package_name>
For other Linux distros kindly refer the official website for package installation.
Important Note: The below privileges are specific to an individual user.
Auto Log Forwarding Privileges for Sudo and Non-Sudo User:
Granting privileges to the rsyslog.conf [or] syslog.conf file.
Note: The acl package must be installed. Before that the filesystem is mounted with the acl support. For more details, kindly refer the official documentation [ ref ].